const koa = require("koa");
const ejs = require("koa-ejs");
const pathlib = require("path");

let server = new koa();
server.listen("8080");

ejs(server,{
  root:     pathlib.resolve('www'),
  layout:   false,
  viewExt:  'html'
})
server.use(async ctx=>{
	await ctx.render("template",{age:24});//直接返回模板页面
})
